They're unused now.
case GDK_MAP:
case GDK_UNMAP:
case GDK_WINDOW_STATE:
- case GDK_OWNER_CHANGE:
case GDK_GRAB_BROKEN:
case GDK_EVENT_LAST:
default:
case GDK_MAP:
case GDK_UNMAP:
case GDK_WINDOW_STATE:
- case GDK_OWNER_CHANGE:
case GDK_GRAB_BROKEN:
case GDK_PAD_BUTTON_PRESS:
case GDK_PAD_BUTTON_RELEASE:
if (event->type == GDK_SELECTION_CLEAR ||
event->type == GDK_SELECTION_NOTIFY ||
- event->type == GDK_SELECTION_REQUEST ||
- event->type == GDK_OWNER_CHANGE)
+ event->type == GDK_SELECTION_REQUEST)
{
*selection = event->selection.selection;
return TRUE;
return FALSE;
}
-/**
- * gdk_event_get_owner_change_reason:
- * @event: a #GdkEvent
- * @reason: (out):
- *
- * Returns: %TRUE on success, otherwise %FALSE
- **/
-gboolean
-gdk_event_get_owner_change_reason (const GdkEvent *event,
- GdkOwnerChange *reason)
-{
- if (!event)
- return FALSE;
-
- if (event->type == GDK_OWNER_CHANGE)
- {
- *reason = event->owner_change.reason;
- return TRUE;
- }
-
- return FALSE;
-}
-
/**
* gdk_event_get_selection_property:
* @event: a #GdkEvent
* @GDK_SCROLL: the scroll wheel was turned
* @GDK_WINDOW_STATE: the state of a window has changed. See #GdkWindowState
* for the possible window states
- * @GDK_OWNER_CHANGE: the owner of a selection has changed. This event type
- * was added in 2.6
* @GDK_GRAB_BROKEN: a pointer or keyboard grab was broken. This event type
* was added in 2.8.
* @GDK_DAMAGE: the content of the window has been changed. This event type
GDK_CLIENT_EVENT = 28,
GDK_SCROLL = 31,
GDK_WINDOW_STATE = 32,
- GDK_OWNER_CHANGE = 34,
GDK_GRAB_BROKEN = 35,
GDK_DAMAGE = 36,
GDK_TOUCH_BEGIN = 37,
GDK_WINDOW_STATE_LEFT_RESIZABLE = 1 << 16
} GdkWindowState;
-/**
- * GdkOwnerChange:
- * @GDK_OWNER_CHANGE_NEW_OWNER: some other app claimed the ownership
- * @GDK_OWNER_CHANGE_DESTROY: the window was destroyed
- * @GDK_OWNER_CHANGE_CLOSE: the client was closed
- *
- * Specifies why a selection ownership was changed.
- */
-typedef enum
-{
- GDK_OWNER_CHANGE_NEW_OWNER,
- GDK_OWNER_CHANGE_DESTROY,
- GDK_OWNER_CHANGE_CLOSE
-} GdkOwnerChange;
-
GDK_AVAILABLE_IN_ALL
GType gdk_event_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_3_92
gboolean gdk_event_get_selection (const GdkEvent *event,
GdkAtom *selection);
-GDK_AVAILABLE_IN_3_94
-gboolean gdk_event_get_owner_change_reason (const GdkEvent *event,
- GdkOwnerChange *reason);
GDK_AVAILABLE_IN_3_92
gboolean gdk_event_get_selection_property (const GdkEvent *event,
GdkAtom *property,
GdkWindow *requestor;
};
-/**
- * GdkEventOwnerChange:
- * @type: the type of the event (%GDK_OWNER_CHANGE).
- * @window: the window which received the event
- * @send_event: %TRUE if the event was sent explicitly.
- * @reason: the reason for the ownership change as a #GdkOwnerChange value
- * @selection: the atom identifying the selection
- * @time: the timestamp of the event
- * @selection_time: the time at which the selection ownership was taken
- * over
- *
- * Generated when the owner of a selection changes. On X11, this
- * information is only available if the X server supports the XFIXES
- * extension.
- *
- * Since: 2.6
- */
-struct _GdkEventOwnerChange
-{
- GdkEventType type;
- GdkWindow *window;
- gint8 send_event;
- GdkOwnerChange reason;
- GdkAtom selection;
- guint32 time;
- guint32 selection_time;
-};
-
/**
* GdkEventProximity:
* @type: the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT).
* @configure: a #GdkEventConfigure
* @property: a #GdkEventProperty
* @selection: a #GdkEventSelection
- * @owner_change: a #GdkEventOwnerChange
* @proximity: a #GdkEventProximity
* @dnd: a #GdkEventDND
* @window_state: a #GdkEventWindowState
GdkEventConfigure configure;
GdkEventProperty property;
GdkEventSelection selection;
- GdkEventOwnerChange owner_change;
GdkEventProximity proximity;
GdkEventDND dnd;
GdkEventWindowState window_state;
return seat->keymap;
}
-static void
-emit_selection_owner_change (GdkWindow *window,
- GdkAtom atom)
-{
- GdkEvent *event;
-
- event = gdk_event_new (GDK_OWNER_CHANGE);
- event->owner_change.window = g_object_ref (window);
- event->owner_change.reason = GDK_OWNER_CHANGE_NEW_OWNER;
- event->owner_change.selection = atom;
- event->owner_change.time = GDK_CURRENT_TIME;
- event->owner_change.selection_time = GDK_CURRENT_TIME;
-
- gdk_event_put (event);
- gdk_event_free (event);
-}
-
static void
data_device_data_offer (void *data,
struct wl_data_device *data_device,
gdk_wayland_selection_set_offer (seat->display, selection, offer);
- emit_selection_owner_change (dest_window, selection);
+ /* emit_selection_owner_change (dest_window, selection); */
}
static void
selection = gdk_atom_intern_static_string ("CLIPBOARD");
gdk_wayland_selection_set_offer (seat->display, selection, offer);
+#if 0
/* If we already have keyboard focus, the selection was targeted at the
* focused surface. If we don't we will receive keyboard focus directly after
* this, so lets wait and find out what window will get the focus before
emit_selection_owner_change (seat->keyboard_focus, selection);
else
seat->pending_selection = selection;
+#endif
}
static const struct wl_data_device_listener data_device_listener = {
selection = gdk_atom_intern_static_string ("PRIMARY");
gdk_wayland_selection_set_offer (seat->display, selection, gtk_primary_offer);
- emit_selection_owner_change (seat->keyboard_focus, selection);
+ /* emit_selection_owner_change (seat->keyboard_focus, selection); */
}
static const struct gtk_primary_selection_device_listener primary_selection_device_listener = {
_gdk_wayland_display_deliver_event (seat->display, event);
+ /*
if (seat->pending_selection != NULL)
{
emit_selection_owner_change (seat->keyboard_focus,
seat->pending_selection);
seat->pending_selection = NULL;
}
+ */
}
static void stop_key_repeat (GdkWaylandSeat *seat);
break;
default:
-#ifdef HAVE_XFIXES
- if (xevent->type - display_x11->xfixes_event_base == XFixesSelectionNotify)
- {
- XFixesSelectionNotifyEvent *selection_notify = (XFixesSelectionNotifyEvent *)xevent;
-
- if (selection_notify->selection == get_cm_atom (display))
- {
- gboolean composited = selection_notify->owner != None;
-
- gdk_display_set_composited (display, composited);
- }
-
- event->owner_change.type = GDK_OWNER_CHANGE;
- event->owner_change.window = window;
- event->owner_change.reason = selection_notify->subtype;
- event->owner_change.selection =
- gdk_x11_xatom_to_atom_for_display (display,
- selection_notify->selection);
- event->owner_change.time = selection_notify->timestamp;
- event->owner_change.selection_time = selection_notify->selection_timestamp;
-
- return_val = TRUE;
- }
- else
-#endif
#ifdef HAVE_RANDR
if (xevent->type - display_x11->xrandr_event_base == RRScreenChangeNotify ||
xevent->type - display_x11->xrandr_event_base == RRNotify)
GdkDevice *device;
GList *tmp_list;
- if (event->type == GDK_OWNER_CHANGE)
- return;
-
/* Find the widget which got the event. We store the widget
* in the user_data field of GdkWindow's. Ignore the event
* if we don't have a widget for it, except for GDK_PROPERTY_NOTIFY
case GDK_DROP_START:
_gtk_drag_dest_handle_event (event_widget, event);
break;
- case GDK_OWNER_CHANGE:
case GDK_EVENT_LAST:
default:
g_assert_not_reached ();
case GDK_DROP_START:
case GDK_DROP_FINISHED:
case GDK_CLIENT_EVENT:
- case GDK_OWNER_CHANGE:
case GDK_DAMAGE:
case GDK_EVENT_LAST:
case GDK_TOUCHPAD_SWIPE: